package org.xiaojl.modules.video.entity;

import org.xiaojl.common.base.BaseEntity;
import org.xiaojl.utils.ToolUtil;

import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

/**
 * <p>
 * 个人视频
 * </p>
 *
 * @author xiaojl
 * @since 2017-10-09
 */
@TableName("video_personalvideo")
public class Personalvideo extends BaseEntity<Personalvideo> {

    private static final long serialVersionUID = 1L;

    /**
     * 视频标题
     */
	private String title;
	
    /**
     * 文件名称
     */
	private String fileName;
	
    /**
     * 文件路径
     */
	private String filePath;
	
	/**
	 * 视频类型：
	 * 	flv格式是加入关联扩展名：.flv，内容类型：application/octet-stream
		f4v格式是扩展名：.f4v，内容类型：application/octet-stream
		mp4格式是扩展名：.mp4，内容类型：video/mp4
		ogv格式是扩展名：.ogv ，内容类型：video/ogg 
		webm格式是扩展名：.webm，内容类型：video/webm
	 */
	private String fileType;
	
    /**
     * 备注
     */
	private String remark;
	


	@Override
	public Wrapper<Personalvideo> bindingQueryWrapper() {
		Wrapper<Personalvideo> wrapper = new EntityWrapper<Personalvideo>();
		if(ToolUtil.isNotEmpty(this.title)){
			wrapper.like("title", this.title);
		}
		if(ToolUtil.isNotEmpty(this.fileName)){
			wrapper.like("fileName", this.fileName);
		}
		if(ToolUtil.isNotEmpty(this.filePath)){
			wrapper.like("filePath", this.filePath);
		}
		if(ToolUtil.isNotEmpty(this.fileType)){
			wrapper.eq("fileType", this.fileType);
		}
		if(ToolUtil.isNotEmpty(this.remark)){
			wrapper.like("remark", this.remark);
		}
		if(ToolUtil.isNotEmpty(this.createTimeStart)){
			wrapper.gt("createTime", this.createTimeStart);
		}
		if(ToolUtil.isNotEmpty(this.createTimeEnd)){
			wrapper.lt("createTime", this.createTimeEnd);
		}
		return wrapper;
	}


	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}


	@Override
	public String toString() {
		return "Personalvideo [ id=" + id 
				+ " title=" + title + ","
				+ " fileName=" + fileName + ","
				+ " filePath=" + filePath + ","
				+ " fileType=" + fileType + ","
				+ " remark=" + remark + ","
				+ " createBy=" + createBy + ", createTime=" + createTime
				+ ", delFlag=" + delFlag + ", createTimeStart="
				+ createTimeStart + ", createTimeEnd=" + createTimeEnd + "]";
	}

}
